import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';

class ContainerPage extends StatelessWidget {
  const ContainerPage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
        appBar: AppBar(title: const Text('ContainerPage')),
        body: Center(
          child:
           Container(
               child:  const Text('内容'),
               width: 100,
               height: 100,
             alignment: Alignment.center,
             //这里有一个冲突问题
             //背景颜色
             // color: Colors.brown,
             //可以理解为边框部分交给BoxDecoration组件管理
             decoration: BoxDecoration(
               //背景颜色
               color: Colors.blue,
               border: Border.all(color: Colors.black, width: 2),
               borderRadius: BorderRadius.circular(12),
               boxShadow: const [
                 BoxShadow(
                   color: Colors.black26,
                   blurRadius: 8,
                   offset: Offset(2, 2),
                 ),
               ],
             ),

           )
        ));
  }
}
